import Vue from 'vue';
import VueRouter from 'vue-router';
import Goods from 'components/goods/goods';

Vue.use(VueRouter);

const Ratings = resolve => require(['components/ratings/ratings'], resolve);
const Seller = resolve => require(['components/seller/seller'], resolve);

const routes = [
  { path: '/', redirect: '/goods' },
  { path: '/goods', component: Goods },
  { path: '/ratings', component: Ratings },
  { path: '/seller', component: Seller }
];

export default new VueRouter({
  linkActiveClass: 'active',
  routes // （缩写）相当于 routes: routes
});
